﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ListUsers.aspx.cs" Inherits="cs499.Admin.ListUsers" %>
<%@ MasterType VirtualPath="~/Site.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="NavOptions" runat="server">
    <ul>
        <li><asp:LinkButton ID="CreateUserbutton" runat="server" PostBackUrl="~/Admin/CreateUser.aspx">Create User</asp:LinkButton></li>
        <li><asp:LinkButton ID="DeleteUserbutton" runat="server" PostBackUrl="~/Admin/DeleteUsers.aspx">Delete User(s)</asp:LinkButton></li>
        <li><asp:LinkButton ID="ImportUserButton" runat="server" PostBackUrl="~/Admin/ImportUser.aspx">Import User(s)</asp:LinkButton></li>
        <li><asp:LinkButton ID="ExportUserButton" runat="server" OnClick="ExportUserButton_Click">Export User(s)</asp:LinkButton></li>
        <li><asp:LinkButton ID="CreateDepartmentbutton" runat="server" PostBackUrl="~/Admin/CreateDepartment.aspx">Create Department</asp:LinkButton></li>
        <li><asp:LinkButton ID="DeleteDepartmentbutton" runat="server" PostBackUrl="~/Admin/DeleteDepartment.aspx">Delete Department</asp:LinkButton></li>
    </ul>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="FeaturedContent" runat="server">
    <section class="featured">
        <div class="content-wrapper">
            <h3><asp:Label ID="ListActionMessage" runat="server" Text="" />  List of Faculty For <asp:Label ID="DepartmentLabel" runat="server" Text="" /></h3>
        </div>
    </section>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1">
        <Columns>
            <asp:BoundField DataField="UserName" HeaderText="UserName" ReadOnly="True" SortExpression="UserName" />
            <asp:CheckBoxField DataField="IsApproved" HeaderText="IsApproved" SortExpression="IsApproved" />
            <asp:CheckBoxField DataField="IsLockedOut" HeaderText="IsLockedOut" ReadOnly="True" SortExpression="IsLockedOut" />
            <asp:BoundField DataField="LastLockoutDate" HeaderText="LastLockoutDate" ReadOnly="True" SortExpression="LastLockoutDate" />
            <asp:BoundField DataField="CreationDate" HeaderText="CreationDate" ReadOnly="True" SortExpression="CreationDate" />
            <asp:BoundField DataField="LastLoginDate" HeaderText="LastLoginDate" SortExpression="LastLoginDate" />
            <asp:BoundField DataField="LastActivityDate" HeaderText="LastActivityDate" SortExpression="LastActivityDate" />
            <asp:BoundField DataField="LastPasswordChangedDate" HeaderText="LastPasswordChangedDate" ReadOnly="True" SortExpression="LastPasswordChangedDate" />
            <asp:CheckBoxField DataField="IsOnline" HeaderText="IsOnline" ReadOnly="True" SortExpression="IsOnline" />
        </Columns>
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetUsersInDepartment" TypeName="cs499.Database.ListOfDepartment">
        <SelectParameters>
            <asp:SessionParameter DefaultValue="-1" Name="departmentId" SessionField="CurrentDepartmentID" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>
